package com.alpaca.recommend.bean;

import com.alpaca.recommend.hbase.activerecord.HModel;
import com.alpaca.recommend.util.MD5Util;
import com.alpaca.recommend.util.SpringContextLoader;

import java.io.IOException;
import java.util.List;

/**
 * Created by wangj on 2015/2/9.
 */
public class URecommend extends HModel<URecommend>{
    public static final URecommend dao = new URecommend();
    public static final String RANK = "r";
    public static final String IDS = "ids";

    public void saveRecommend(String rowKey , String ids) {
        URecommend uRecommend = new URecommend();
        uRecommend.setRow(rowKey).set(RANK, IDS,ids).save();
    }


    public static void main(String[] args) throws IOException {
        SpringContextLoader.init();
        String rowKey = MD5Util.md5(1) +  MD5Util.md5(90022) ;
        URecommend uRecommends = new URecommend();
        uRecommends.setRow(rowKey);
        uRecommends.set("r" , "ids" , "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15").save();


        System.exit(0);
    }

}
